package example.service;

import example.dao.CommentDao;
import example.entity.Comment;

import java.util.List;

/**
 * @author 张心怡
 * @date 2024/12/16
 */
public class CommentService {

    public static void addComment(Comment comment) {

        CommentDao.addComment(comment);
    }

    public static List<Comment> getCommentsByBookId(int bookId) {
        return CommentDao.getCommentsByBookId(bookId);
    }

    public static void deleteComment(int id) {
        CommentDao.deleteComment(id);
    }
}
